<template>
  <div>
    <div class="modal">
      <div class="modal-bg" @click="HfollwClose"></div>
      <div class="Htran">
        <div class="rele-titles"><img @click="HfollwClose" src="../assets/img/tub.png" alt="">添加新的角色</div>
              <div class="Htran-b-name">
                <div class="Htran-b-role">角色名称</div>
                <input v-model="title" placeholder="请输入内容" style="width: 74%;height: 27px; left: 40px; position: relative;padding-left: 5px;cursor: pointer;"></input>
              </div>
            <div class="primary_link">
          <el-button type="primary" @click="submi">保存</el-button>
        </div>
        </div>
      </div>
    </div>
</template>
<script type="text/babel">
  export default {
    props: {
      LDmodal: {
        type: Function
      },
      HfollwClose: {
        type: Function
      },
      getRoleList:{
        type:Function
      }
      // ids: {
      //   type: Number
      // }
    },
    data() {
      return {
        timevalue2: "",
        timevalue1: "",
        HtranClose: "",
        checked: false,
        title: "",
        // FollowValue:"", 跟进方式
        // Follow: [{
        //   FollowValue: '选项1',
        //   label: '黄金糕'
        // },
        // ]
      }
    },
    // computed: {
    //   SSid() {
    //     return this.ids
    //   }
    // },
    methods: {
      submi() {
        let that = this;
        this.$http.post('/index/role',{
          title:this.title
        })
        .then(function(res) {
          console.log(res);
          if (res.data.status === 1) {
            that.getRoleList();
            that.HfollwClose();
            // that.SSid = '';
            that.title = '';
            that.$store.state.messageString = res.data.msg;
            that.LDmodal();
          }else {
            that.$store.state.messageString = res.data.msg;
            that.LDmodal();
          }
        })
        .catch(function(err) { console.log(err);
        })
      }

    },
    mounted: function() {
    },
  }
</script>
<style scoped>

  .primary_link {
    text-align: center;
    margin-top: 150PX;
    margin-left: 45%;
    z-index: 999;
    position: absolute;
  }

  .btn button{
    width: 100px;
    background: #409EFF;
    color: #fff;
    border:none;
    border-radius: 5px;
  }
  .btn button:nth-child(2){
    float: right;
  }
  .Htran-b-name{
    width: 50%;
    text-align: center;
    float: left;
    left: 80px;
    top: 85px;
    line-height: 27px;
    position: absolute;
  }

  .Htran-b-input{
    width: 65%;
    float: left;

  }

  .Htran-input input{
    width: 100%;
    float: left;
    border:none;
    line-height: 27px;
    border-bottom: 1px solid  #d3d3d3;
  }

  .Htran{
    width: 26%;
    height: 260px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    /*top: 50%;*/
    margin-top: -423px;
    left: 37%;
    z-index: 10;
  }
  .rele-titles{
    width: 15.6%;
    /*padding: 0 0.5%;*/
    line-height: 50px;
    font-size: 0.5em;
    color: #000;
    background: #f5f5f7;
    position: fixed;
    z-index: 9;
    border-bottom:1px solid #d3d3d3;
    padding-right: 200px;
  }
  img{
    left: 155%;

  }
  img{
    /*position: fixed;*/
    flex-star:40px;
    /*margin-left: 44%;*/
    position: relative;
    cursor: pointer;
  }
  .Htran-b-role{
    position: absolute;
  }
</style>
